package chapter2;

//Null is false non-null is true
if (null) {               
	assert false
} 
else {
	assert true
}

// For in range
def clinks = 0                   
for (remainingGuests in 0..9) {  
	clinks += remainingGuests    
}                               

// For in list
def list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 
for (j in list) {                         
	assert j == list[j]                   
}                                         

// Each methos with a clusure
list.each() { item ->         
	assert item == list[item] 
}                             